import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:mybase/base/tool/platformUtils/FFPlatform.dart';

/// 在main函数最开始的时候调用
void jjMainStart({SystemUiOverlayStyle? style}) {
  /// 绑定引擎
  WidgetsFlutterBinding.ensureInitialized();

  /// android 沉浸式体验 ： 设置状态条 和 底部系统导航条
  // if (FFPlatform.isAndroid) {
  SystemChrome.setSystemUIOverlayStyle(style ?? jjLight);
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
  // }
}


SystemUiOverlayStyle jjLight = const SystemUiOverlayStyle(
  // 状态栏背景颜色
  statusBarColor: Colors.transparent,
  // 状态栏亮色
  systemNavigationBarIconBrightness: Brightness.light,
  statusBarIconBrightness: Brightness.light,
  statusBarBrightness: Brightness.dark,
  // 底部系统导航条颜色
  systemNavigationBarColor: Colors.transparent,
  // 底部系统导航条分隔线颜色
  systemNavigationBarDividerColor: Colors.transparent,
);


SystemUiOverlayStyle jjDark = const SystemUiOverlayStyle(
  // 状态栏背景颜色
  statusBarColor: Colors.transparent,
  // 状态栏暗色
  systemNavigationBarIconBrightness: Brightness.dark,
  statusBarIconBrightness: Brightness.dark,
  statusBarBrightness: Brightness.light,
  // 底部系统导航条颜色
  systemNavigationBarColor: Colors.transparent,
  // 底部系统导航条分隔线颜色
  systemNavigationBarDividerColor: Colors.transparent,
);